#ifndef __BSP_VBAT_H__
#define __BSP_VBAT_H__

//#include <stdint.h>


#include "config.h"
#include "hc32_ddl.h"
#include "global.h"




/* ADC2 channel definition for this example. */
//#define ADC2_SA_NORMAL_CHANNEL      (ADC2_CH_INTERNAL)
#define ADC2_SA_CHANNEL             (ADC2_CH3)
#define ADC2_SA_CHANNEL_COUNT       (1u)


#define ADC2_INTERNAL_INDEX         (ADC_CH_IDX3)

/* ADC2 channel sampling time.     ADC2_CH_INTERNAL */
#define ADC2_SA_CHANNEL_SAMPLE_TIME { 0x60 }



void BspVbatInit(void);

uint16 BspVbatAdVal(void);

float BspVatVoltage(void);

#endif

